import axios from './axios'
import resfulParamsToUrl from './resfulParamsToUrl'

export const fileURLConfig = {
	// 上传图片处理接口路径
	uploadPicture:
		'http://' +
		window.location.host +
		axios.defaults.baseURL +
		'sys/auth/upload/picture',
	// 医院icon文件夹名称
	uploadHospitalFolderName: 'orgHospitalImage',
	// 医生头像文件夹名称
	uploadDoctorFolderName: 'doctorImage',
	// banne文件夹名称
	uploadBanneFolderName: 'banneImage',
	// * 文章图片文件夹
	articleFolderName: 'articleImage',
}

// 删除图片
export const delImageUpload = params => {
	axios.prototype._loading_ = false
	return axios
		.post(resfulParamsToUrl('/sys/auth/upload/delUpload', params), params)
		.catch(() => {})
}
